<template>
  <div class="yinchang">
    <div :style="{ height: windowHeight + 'px' }">
      <iframe class="wu-iframe" src="/moban6700/index.html" style="width:100%; height:100%; overflow: hidden;"></iframe>
    </div>
  </div>
</template>

<script>
export default {
  name: 'IframeHtml',
  data() {
    return {
      windowHeight: 0
    };
  },
  mounted() {
    // 获取窗口高度
    this.windowHeight = window.innerHeight;
    window.addEventListener('resize', this.updateWindowHeight);

    // 隐藏滚动条
    document.body.style.overflow = 'hidden';
  },
  beforeDestroy() {
    window.removeEventListener('resize', this.updateWindowHeight);
  },
  methods: {
    updateWindowHeight() {
      this.windowHeight = window.innerHeight;
    }
  }
};
</script>

<style scoped>
.wu-iframe {
  border: none;
}
/* 隐藏滚动条的综合方案 */
.yinchang {
  /* WebKit 浏览器 */

  ::-webkit-scrollbar {
    width: 0;
    height: 0;
  }

  /* Firefox 浏览器 */
  scrollbar-width: none;

  /* IE 和旧版 Edge 浏览器 */
  -ms-overflow-style: none;
}
</style>
